<template>
	<view class="p_bg_all">
		<noneData noneTitle="暂无数据~" v-if="listData.length == 0"></noneData>
		<view v-else>
			<view class="list_wrapper p_font_28" v-for="item in listData" :key="item.id">
				<view class="list_tab">
					<view class="p_color_b2">用户ID：</view>
					<view>{{item.user_id}}</view>
				</view>
				<view class="list_tab">
					<view class="p_color_b2">文档名称：</view>
					<view>{{item.name}}</view>
				</view>
				<view class="list_tab">
					<view class="p_color_b2">下单时间：</view>
					<view>{{item.create_time}}</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import noneData from '../../components/noneData.vue';

	export default {
		components: {
			noneData
		},
		data() {
			return {
				listData: [],
			}
		},
		onLoad() {
			this.getListData();
		},
		methods: {
			getListData() {
				this.$http.post(this.$api.shareOrderList).then(res => {
					this.listData = res.data;
				})
			}
		}
	}
</script>

<style lang="less">
	.list_wrapper {
		padding: 32rpx;
		margin: 32rpx;
		border-radius: 16rpx;
		background-color: #fff;
	}

	.list_tab {
		display: flex;
		margin-top: 8rpx;

		&:first-child {
			margin-top: 0;
		}

		view {
			&:last-child {
				flex: 1;
			}
		}
	}
</style>